// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_prot;

import android.graphics.Bitmap;
import android.text.TextUtils;
import com.nnee.p_b.p_a.cls_d;
import com.nnee.p_f.cls_h;
import com.nnee.p_f.cls_i;
import com.nnee.p_fk.p_a.cls_b;
import com.nnee.p_fk.p_a.cls_k;
import com.nnee.p_fk.p_a.cls_m;

import com.nnee.p_pr.p_atom.cls_ac;
import com.nnee.p_pr.p_atom.cls_s;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.p_atom.p_u.cls_UserInfo;
import com.nnee.p_pr.p_b.cls_a;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.message.BasicNameValuePair;

// Referenced classes of package com.nnee.p_pr.p_prot:
//            n, d

public class cls_c
{

    public cls_c()
    {
    }

    public static cls_k a(cls_u u1, cls_ac ac, String s, String s1)
    {
        String s2 = u1.bg();
        if(s2 == null)
            s2 = com.nnee.p_pr.p_b.cls_a.b();
        cls_k k1 = new cls_k(s2, b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(u1.V(), u1.U(), u1.bd(), u1.bf(), ac, s)));
        return k1;
    }

    public static cls_k a(cls_u u1, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.H(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(u1, s)));
        return k1;
    }

    public static cls_k a(cls_UserInfo userinfo, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.v(), b.b);
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(userinfo)));
        k1.b("Cache-Control", "no-cache");
        return k1;
    }

    public static cls_k a(com.nnee.p_pr.p_prot.cls_d d1, cls_ac ac, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.b(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(d1, ac, s)));
        return k1;
    }

    public static cls_k a(com.nnee.p_pr.p_prot.cls_d d1, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.H(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(d1, s)));
        return k1;
    }

    public static cls_k a(String s)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.u());
        k1.b("Accept", "*/*");
        k1.b("Cache-Control", "no-cache");
        k1.a("username", s);
        return k1;
    }

    public static cls_k a(String s, cls_ac ac, String s1, String s2)
    {
        cls_k k1;
        if(ac != null)
        {
            k1 = new cls_k(s, cls_b.POST);
            k1.b("Content-Type", "application/atom+xml");
            k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(ac)));
        } else
        {
            k1 = new cls_k(s);
        }
        return k1;
    }

    public static cls_k a(String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.r());
        k1.b("Cache-Control", "no-cache");
        k1.b("PRIS-Session", d);
        k1.a("did", com.nnee.p_pr.a.u.g(com.nnee.p_b.p_a.cls_d.h().a()));
        return k1;
    }

    public static cls_k a(String s, String s1, Bitmap bitmap, String s2)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.w(), b.b);
        android.graphics.Bitmap.CompressFormat compressformat1 = android.graphics.Bitmap.CompressFormat.valueOf(s2);
        android.graphics.Bitmap.CompressFormat compressformat = compressformat1;
        k1.b("Content-Type", s2);
_L1:
        Exception exception1;
        ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
        Exception exception;
        if(compressformat == null)
        {
            bitmap.compress(android.graphics.Bitmap.CompressFormat.JPEG, 100, bytearrayoutputstream);
            k1.b("Content-Type", "image/jpg");
        } else
        {
            bitmap.compress(compressformat, 100, bytearrayoutputstream);
        }
        k1.a(new ByteArrayEntity(bytearrayoutputstream.toByteArray()));
        return k1;
        exception;
        compressformat = null;
        exception1 = exception;
_L2:
        exception1.printStackTrace();
          goto _L1
        exception1;
          goto _L2
    }

    public static cls_k a(String s, String s1, cls_ac ac, int j, String s2, String s3)
    {
        StringBuilder stringbuilder = (new StringBuilder()).append("");
        String s4;
        cls_k k1;
        if(j < 1)
            j = 1;
        s4 = s.replace("{startPage?}", stringbuilder.append(j).toString()).replace("{searchTerms}", URLEncoder.encode(s1));
        if(ac != null)
        {
            k1 = new cls_k(s4, b.b);
            k1.b("Content-Type", "application/atom+xml");
            k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(ac)));
        } else
        {
            k1 = new cls_k(s4);
        }
        return k1;
    }

    public static cls_k a(String s, String s1, cls_ac ac, String s2, String s3)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.a("id", s1);
        k1.a("op", "del");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.cls_n.b(ac)));
        return k1;
    }

    public static cls_k a(String s, String s1, cls_ac ac, String s2, String s3, String s4)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s1, s2, s3, ac)));
        return k1;
    }

    public static cls_k a(String s, String s1, cls_s s2, String s3, String s4, String s5)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml;type=entry");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s1, s4, s3, s2)));
        return k1;
    }

    public static cls_k a(String s, String s1, String s2)
    {
        return new cls_k(s);
    }

    public static cls_k a(String s, String s1, String s2, float f1, String s3, String s4)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml;type=entry");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s1, s3, s2, f1)));
        return k1;
    }

    public static cls_k a(String s, String s1, String s2, cls_ac ac, String s3, String s4, String s5)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml;type=entry");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s2, s4, s1, s3, ac)));
        return k1;
    }

    public static cls_k a(String s, String s1, String s2, String s3)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.a("id", s1);
        k1.a("op", "del");
        return k1;
    }

    public static cls_k a(String s, String s1, String s2, String s3, String s4)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml;type=entry");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s2, s3, s1)));
        return k1;
    }

    public static cls_k a(String s, String s1, String s2, String s3, String s4, String s5)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml;type=entry");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s1, s4, s2, s3)));
        return k1;
    }

    public static cls_k a(LinkedList linkedlist, String s, String s1, String s2, String s3)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.F(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(linkedlist, s, s1, s2)));
        return k1;
    }

    public static cls_k a(List list, com.nnee.p_h.cls_a a1, int j, int l, int i1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.K(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
        cls_h h1 = new cls_h(bytearrayoutputstream);
        com.nnee.p_f.cls_b b1 = h1.c("reports", null);
        b1.a("account", a1.b());
        b1.a("id", a1.e());
        b1.a("os", a1.g());
        b1.a("os_version", a1.h());
        b1.a("ver", a1.d());
        b1.a("product", a1.i());
        com.nnee.p_f.cls_b b2 = b1.a("offline_report", null);
        b2.a("net", String.valueOf(j));
        com.nnee.p_f.cls_b b3 = b2.a("sources", null);
        for(Iterator iterator = list.iterator(); iterator.hasNext(); b3.a("source", (String)iterator.next()));
        b2.a("hide", null).a("times", String.valueOf(l));
        b2.a("result", String.valueOf(i1));
        h1.a();
        k1.a(new ByteArrayEntity(bytearrayoutputstream.toByteArray()));
        return k1;
    }

    public static cls_m a()
    {
        String s = com.nnee.p_pr.p_b.cls_a.G();
        Object obj;
        if(s == null)
            obj = null;
        else
            obj = new cls_k(s);
        return ((cls_m) (obj));
    }

    public static cls_m a(int j, String s, String s1)
    {
        Object obj = null;
        String s2 = com.nnee.p_pr.p_b.cls_a.o();
        if(s2 != null)
        {
            cls_k k1 = new cls_k(s2, b.b);
            k1.b("Content-Type", "application/atom+xml");
            ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
            cls_h h1 = new cls_h(bytearrayoutputstream);
            com.nnee.p_f.cls_b b1 = h1.c("errors", ((String) (obj))).f("http");
            b1.b("code", String.valueOf(j));
            b1.b("href", s);
            b1.g(s1);
            h1.a();
            k1.a(new ByteArrayEntity(bytearrayoutputstream.toByteArray()));
            obj = k1;
        }
        return ((cls_m) (obj));
    }

    public static cls_m a(long l, String s, String s1, String s2, String s3)
    {
        cls_m m1 = new cls_m("http://fankui.163.com/ft/commentInner.fb", b.b);
        m1.b("Content-Type", "application/x-www-form-urlencoded");
        StringBuilder stringbuilder = new StringBuilder();
        stringbuilder.append(com.nnee.p_pr.p_a.cls_e.c(com.nnee.p_b.p_a.cls_d.h().a()));
        stringbuilder.append(";");
        stringbuilder.append((new StringBuilder()).append("android/").append(android.os.Build.VERSION.RELEASE).toString());
        stringbuilder.append(";");
        stringbuilder.append("PRIS/");
        stringbuilder.append(com.nnee.p_pr.p_a.cls_e.a(com.nnee.p_b.p_a.cls_d.h().a()));
        ArrayList arraylist = new ArrayList();
        arraylist.add(new cls_basicNameValuePair("feedbackId", String.valueOf(l)));
        arraylist.add(new cls_basicNameValuePair("productId", "11001"));
        arraylist.add(new cls_basicNameValuePair("resolution", stringbuilder.toString()));
        arraylist.add(new cls_basicNameValuePair("userName", s));
        if(s1 != null)
            arraylist.add(new cls_basicNameValuePair("title", s1));
        arraylist.add(new cls_basicNameValuePair("content", s2));
        if(s3 != null)
        {
            arraylist.add(new cls_basicNameValuePair("fileId", s3));
            arraylist.add(new cls_basicNameValuePair("fileName", "pris_log.zip"));
        }
        try
        {
            m1.a(new UrlEncodedFormEntity(arraylist, "GB2312"));
        }
        catch(UnsupportedEncodingException unsupportedencodingexception)
        {
            unsupportedencodingexception.printStackTrace();
        }
        return m1;
    }

    public static cls_m a(com.nnee.p_h.cls_b b1, String s, String s1)
    {
        cls_m m1 = com.nnee.h.c.a(b1, s, null, null, s1);
        m1.b("Cache-Control", "no-cache");
        return m1;
    }

    public static cls_k b()
    {
        return new cls_k("http://easyread.163.com/getServiceUrl.atom");
    }

    public static cls_k b(com.nnee.p_pr.p_prot.cls_d d1, cls_ac ac, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.c(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.cls_n.b(d1, ac, s)));
        return k1;
    }

    public static cls_k b(com.nnee.p_pr.p_prot.cls_d d1, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.I(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.cls_n.b(d1, s)));
        return k1;
    }

    public static cls_k b(String s, cls_ac ac, String s1, String s2)
    {
        cls_k k1;
        if(ac != null)
        {
            k1 = new cls_k(s, b.b);
            k1.b("Content-Type", "application/atom+xml");
            k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(ac)));
        } else
        {
            k1 = new cls_k(s);
        }
        return k1;
    }

    public static cls_k b(String s, String s1)
    {
        return new cls_k(com.nnee.p_pr.p_b.cls_a.y());
    }

    public static cls_k b(String s, String s1, String s2)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.I(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(s, s1)));
        return k1;
    }

    public static cls_k b(String s, String s1, String s2, String s3)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.F(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(n.c(s, s1, s2)));
        return k1;
    }

    public static cls_k b(String s, String s1, String s2, String s3, String s4)
    {
        cls_k k1 = new cls_k(s, b.c);
        k1.b("Content-Type", "application/atom+xml;type=entry");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.cls_n.b(s1, s2, s4)));
        k1.a("op", "edit");
        return k1;
    }

    public static cls_m b(String s)
    {
        String s1 = com.nnee.p_pr.p_b.cls_a.t();
        Object obj;
        if(s1 == null || s == null)
        {
            obj = null;
        } else
        {
            obj = new cls_k(s1);
            ((k) (obj)).a("articleid", s);
        }
        return ((cls_m) (obj));
    }

    public static cls_k c(com.nnee.p_pr.p_prot.cls_d d1, cls_ac ac, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.E(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(n.c(d1, ac, s)));
        return k1;
    }

    public static cls_k c(String s, cls_ac ac, String s1, String s2)
    {
        cls_k k1 = new cls_k(s, b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.cls_n.b(ac)));
        return k1;
    }

    public static cls_k c(String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.z());
        String s2 = com.nnee.p_pr.a.i.c(com.nnee.p_b.p_a.cls_d.h().a());
        if(!TextUtils.isEmpty(s2))
            k1.a("mid", s2);
        return k1;
    }

    public static cls_k c(String s, String s1, String s2)
    {
        cls_k k1 = new cls_k(s);
        k1.b("Content-Type", "application/atom+xml");
        return k1;
    }

    public static cls_m c()
    {
        cls_k k1 = new cls_k("http://fankui.163.com/ft/file.fb?op=up", b.b);
        File file;
        com.nnee.p_a.p_b.cls_b b1;
        com.nnee.p_a.p_b.cls_a aa[];
        if(com.nnee.p_g.cls_b.c("pris_log.zip"))
        {
            file = com.nnee.p_g.cls_b.b("pris_log.zip");
            com.nnee.p_g.cls_b.c("createPostLogReqeust upload=", file.toString());
        } else
        {
            com.nnee.p_g.cls_b.c("createPostLogReqeust()", "zip fail");
            file = null;
        }
        try
        {
            b1 = new com.nnee.p_a.p_b.cls_b("Filedata", "pris_log.zip", file, "application/zip", null);
        }
        catch(FileNotFoundException filenotfoundexception)
        {
            filenotfoundexception.printStackTrace();
            b1 = null;
        }
        aa = new com.nnee.p_a.p_b.cls_a[1];
        aa[0] = b1;
        k1.a(new com.nnee.p_a.p_b.cls_h(aa));
        return k1;
    }

    public static cls_m c(com.nnee.p_pr.p_prot.cls_d d1, String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.L(), b.b);
        k1.b("Content-Type", "application/atom+xml");
        k1.a(new ByteArrayEntity(com.nnee.p_pr.p_prot.n.a(d1, s, s1)));
        return k1;
    }

    public static cls_m c(String s)
    {
        String s1 = com.nnee.p_pr.p_b.cls_a.t();
        Object obj;
        if(s1 == null || s == null)
        {
            obj = null;
        } else
        {
            obj = new cls_k(s1);
            ((k) (obj)).a("url", s);
        }
        return ((cls_m) (obj));
    }

    public static cls_k d(String s)
    {
        return new cls_k(s);
    }

    public static cls_k d(String s, String s1)
    {
        return new cls_k(com.nnee.p_pr.p_b.cls_a.j());
    }

    public static cls_k d(String s, String s1, String s2)
    {
        return new cls_k(s);
    }

    public static cls_k e(String s, String s1)
    {
        cls_k k1 = new cls_k(com.nnee.p_pr.p_b.cls_a.D());
        k1.b("Cache-Control", "no-cache");
        return k1;
    }

    public static cls_k e(String s, String s1, String s2)
    {
        cls_k k1 = new cls_k(s);
        k1.b("Content-Type", "application/atom+xml");
        return k1;
    }

    public static cls_k f(String s, String s1)
    {
        return new cls_k(com.nnee.p_pr.p_b.cls_a.S());
    }

    static final boolean a;
    public static String b = "anonymous";
    public static String c = "anonymous";
    public static String d = "android_pris_login_seesion_id";

}
